From: Colin Walters Date: Thu, 21 Sep 2017 15:00:47 +0000 (-0400) Subject: lib/checkout: Squash a gcc maybe-uninitialized warning X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~31^2~53 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=f639f8f4c0ea8992203848c4e5f1c841c14f58f1;p=ostree.git lib/checkout: Squash a gcc maybe-uninitialized warning gcc doesn't know that our enum cases must be exhaustive. Closes: #1201 Approved by: jlebon --- diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c index 7e36e689..de239eeb 100644 --- a/src/libostree/ostree-repo-checkout.c +++ b/src/libostree/ostree-repo-checkout.c @@ -303,11 +303,11 @@ create_file_copy_from_input_at (OstreeRepo *repo, return FALSE; /* The add/union/none behaviors map directly to GLnxLinkTmpfileReplaceMode */ - GLnxLinkTmpfileReplaceMode replace_mode; + GLnxLinkTmpfileReplaceMode replace_mode = GLNX_LINK_TMPFILE_NOREPLACE; switch (options->overwrite_mode) { case OSTREE_REPO_CHECKOUT_OVERWRITE_NONE: - replace_mode = GLNX_LINK_TMPFILE_NOREPLACE; + /* Handled above */ break; case OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES: replace_mode = GLNX_LINK_TMPFILE_REPLACE;